<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>axivdma: xaxivdma_example_intr.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">axivdma
   </div>
   <div id="projectbrief">Vitis Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Overview</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="globals.html"><span>APIs</span></a></li>
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="pages.html"><span>Examples</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('xaxivdma__example__intr_8c.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">xaxivdma_example_intr.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Overview</h2>
<div class="textblock"><p>This example demonstrates how to use the AXI Video DMA in loopback mode to do video frame transfers. </p>
<p>This example reads video frames from memory, using Memory Map to Stream (MM2S) interface, and then video frames are written to memory using Stream to Memory Map (S2MM) AXI4 interface. At the end of transfer it does sanity check and report pass/fail status.</p>
<p>To see the debug print, you need a Uart16550 or uartlite in your system, and please set "-DDEBUG" in your compiler options. You need to rebuild your software executable.</p>
<dl class="section note"><dt>Note</dt><dd>The values of DDR_BASE_ADDR and DDR_HIGH_ADDR should be as per the HW system.</dd></dl>
<pre>
MODIFICATION HISTORY:</pre><pre>Ver   Who  Date     Changes
----- ---- -------- -------------------------------------------------------
1.00a jz   07/26/10 First release
1.01a jz   09/26/10 Updated callback function signature
2.00a jz   12/10/10 Added support for direct register access mode, v3 core
2.01a rvp  01/22/11 Renamed the example file to be consistent
                       Added support to the example to use SCU GIC interrupt
               controller for ARM, some functions in this example have
               changed.
      rkv  03/28/11 Updated to support for frame store register.
3.00a srt  08/26/11 Added support for Flush on Frame Sync Feature.
4.00a srt  03/06/12 Modified interrupt support for Zynq.
4.02a srt  09/25/12 Fixed CR 677704
               Description - Arguments misused in function
                    <a class="el" href="group__axivdma.html#ga4c687431dde198458fb4e42dff22c106" title="Enable specific interrupts for a channel. ">XAxiVdma_IntrEnable()</a>.
4.03a srt  03/01/13 Updated DDR base address for IPI designs (CR 703656).
6.2   ms   01/23/17 Modified xil_printf statement in main function to
                    ensure that "Successfully ran" and "Failed" strings
                    are available in all examples. This is a fix for
                    CR-965028.
6.5   rsp  12/01/17 Set TX/RX framebuffer count to IP default. CR-990409
6.6   rsp  07/02/18 Set Vertical Flip state to IP default. CR-989453
6.7   sk   05/06/20 Fix optimization level 2 failure in release mode.
6.8   sk   07/07/20 Add frame data check support
6.9      sk   05/25/21 Modify the ReadSetup buffer initialization call and
               CheckFrame to correct the example logic.
6.9      sk   05/25/21 Fix data comparison failure wtih optimization level 2.
6.10  rsp  09/09/21 Fix read/write done count check in while loop.
                    Remove unused variable GCC warning in ReadSetup().
6.11  rsp  03/16/21 After Wr/Rd channel reset ensure it's completed
                    and then do data comparison.
6.12  sa   08/12/22 Updated the example to use latest MIG cannoical define
                       i.e XPAR_MIG_0_C0_DDR4_MEMORY_MAP_BASEADDR.
6.13     sa   09/29/22 Fix infinite loops in the example.
</pre><hr/>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a840291bc02cba5474a4cb46a9b9566fe"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xaxivdma__example__intr_8c.html#a840291bc02cba5474a4cb46a9b9566fe">main</a> (void)</td></tr>
<tr class="memdesc:a840291bc02cba5474a4cb46a9b9566fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Main function.  <a href="#a840291bc02cba5474a4cb46a9b9566fe">More...</a><br/></td></tr>
<tr class="separator:a840291bc02cba5474a4cb46a9b9566fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a840291bc02cba5474a4cb46a9b9566fe"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int main </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Main function. </p>
<p>This function is the main entry point of the example on DMA core. It sets up DMA engine to be ready to receive and send frames, and start the transfers. It waits for the transfer of the specified number of frame sets, and check for transfer errors.</p>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS if example finishes successfully</li>
<li>XST_FAILURE if example fails.</li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>References <a class="el" href="group__axivdma.html#ga76cf51d7be754a670e697e74966c68cd">XAxiVdma_Config::BaseAddress</a>, <a class="el" href="group__axivdma.html#ga251605353cc3af9cc740d568adc1a217">XAxiVdma_Config::IntrParent</a>, <a class="el" href="group__axivdma.html#gabbeae935b306619b3e2d41598ea1727e">XAxiVdma_Config::MaxFrameStoreNum</a>, <a class="el" href="group__axivdma.html#ga03ffbe1551620b7f0f72b905006dcf88">XAxiVdma_FrameCounter::ReadDelayTimerCount</a>, <a class="el" href="group__axivdma.html#gaa60c173f1c6d7314821ae2c24e2ff7af">XAxiVdma_FrameCounter::ReadFrameCount</a>, <a class="el" href="group__axivdma.html#gad55f207b3d4bfab082a90ea7a43f044c">XAxiVdma_FrameCounter::WriteDelayTimerCount</a>, <a class="el" href="group__axivdma.html#gab43078f5f7fdd17728ac6ecfb97aea27">XAxiVdma_FrameCounter::WriteFrameCount</a>, <a class="el" href="group__axivdma.html#ga7dff0c11a9aa88a19519734702904dca">XAxiVdma_CfgInitialize()</a>, <a class="el" href="group__axivdma.html#ga15653f0679e3a33efd384598b6c42e08">XAxiVdma_GetStatus()</a>, <a class="el" href="group__axivdma.html#ga7ed954b5de3073f15b8e47c5736d627b">XAXIVDMA_HANDLER_ERROR</a>, <a class="el" href="group__axivdma.html#ga4c57db0180eafe041035a8d4781cb2b9">XAXIVDMA_HANDLER_GENERAL</a>, <a class="el" href="group__axivdma.html#ga4c687431dde198458fb4e42dff22c106">XAxiVdma_IntrEnable()</a>, <a class="el" href="group__axivdma.html#ga6e80967b83e9f0f65dfde6c92008f0d2">XAXIVDMA_IXR_ALL_MASK</a>, <a class="el" href="group__axivdma.html#ga0188e06158c255eba62f52141cff5d84">XAxiVdma_LookupConfig()</a>, <a class="el" href="group__axivdma.html#ga5fa27b3ce66d947167262fe918fb5373">XAXIVDMA_READ</a>, <a class="el" href="group__axivdma.html#ga60ceb86226e513a16d6776a97fcfa50f">XAxiVdma_ReadIntrHandler()</a>, <a class="el" href="group__axivdma.html#ga8dbd2faa070ca571f049e3b61f9bdb1e">XAxiVdma_Reset()</a>, <a class="el" href="group__axivdma.html#ga3e01bd69f101126d5962f7078ee3e520">XAxiVdma_ResetNotDone()</a>, <a class="el" href="group__axivdma.html#gafd0477fae9534ebd2d2e15cc8885642d">XAxiVdma_SetCallBack()</a>, <a class="el" href="group__axivdma.html#gaabe404c2a5c1483bc95be749c7540ba4">XAxiVdma_SetFrameCounter()</a>, <a class="el" href="group__axivdma.html#gaf331929e09bf1454dc2835b6ecc4ff30">XAxiVdma_SetFrmStore()</a>, <a class="el" href="group__axivdma.html#ga525d0fa8fc04a9dde871ab55cf6b227b">XAXIVDMA_WRITE</a>, and <a class="el" href="group__axivdma.html#gaad76f2f6ab41e322ddcd240d2af8140d">XAxiVdma_WriteIntrHandler()</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
	<p class="footer">&copy; Copyright 2015-2022 Xilinx, Inc. All Rights Reserved.</p>
	<p class="footer">&copy; Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.</p>
</div>
</body>
</html>
